#include <stdio.h>

//factorial 阶乘 
//阶乘函数 循环
int factorial(int factor)
{
	int result = 1;
	for(int i = factor ; i >= 1 ; i-- )
	{
 		result = result * i;
	}
	return result;
}

int main()
{
	int input;
	scanf("%d",&input);
	printf("%d",factorial(input));
}